<?php

declare(strict_types=1);
/**
 * Author: Zane
 * Email: 873934580@qq.com
 * Date: 2023/7/17.
 */

namespace App\Http\Controllers\System;

use App\Http\Controllers\Controller;
use App\Service\ArchiveService;
use App\Utils\ResultsVo;

class ArchivesController extends Controller
{
    protected $archiveService;

    public function __construct(ArchiveService $archiveService)
    {
        parent::__construct();
        $this->archiveService = $archiveService;
    }

    public function index(): \Illuminate\Http\JsonResponse
    {
        $results = $this->archiveService->lists();

        return ResultsVo::success($results);
    }
}
